{extend name='public/modal'}
{block name='content'}
<style type="text/css">
    .submit_btn{
         float: center;
  }
  .domeImg{width: 50%;margin-left: 20%;}
</style>
<form action="add_icon" class="layui-form layui-form-pane" id="mainForm" method="post" enctype="multipart/form-data">

    <form class="form-horizontal" id='addForm' action="add_banner" enctype="multipart/form-data">
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识中文名
                            </label>
                            <div class="layui-input-block">
                                 <input type="text" name="zh_name"  class="layui-input" id="zh_name" value="">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识英文名
                            </label>
                            <div class="layui-input-block">
                                 <input type="text" name="eb_name"  class="layui-input" id="eb_name" value="">
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识价格
                            </label>
                            <div class="layui-input-block">
                                 <input type="text" name="price"  class="layui-input" id="price" value="">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                货期
                            </label>
                            <div class="layui-input-block">
                                 <input type="date" name="delivery_time"  class="layui-input" id="delivery_time" value="">
                            </div>
                        </div>

                        <div class="layui-upload">
                          <div class="layui-upload-list">
						  <button type="button" class="layui-btn" id="test1">标识照片1</button>
                            <img class="layui-upload-img domeImg" id="demo1">
                            <input type="hidden" name="image_url_1" id="image_url_1" value="">
                            <p id="demoText"></p>
                          </div>
                        </div>  


                        <div class="layui-upload">
                          <div class="layui-upload-list">
                          <button type="button" class="layui-btn" id="test2">标识照片2</button>
                            <img class="layui-upload-img domeImg" id="demo2">
                            <input type="hidden" name="image_url_2" id="image_url_2" value="">
                            <p id="demoText"></p>
                          </div>
                        </div>  

                        <div class="layui-upload">
                          <div class="layui-upload-list">
                          <button type="button" class="layui-btn" id="test3">标识2D图片</button>
                            <img class="layui-upload-img domeImg" id="demo3">
                            <input type="hidden" name="image_2d_url" id="image_2d_url" value="">
                            <p id="demoText"></p>
                          </div>
                        </div> 

                        <div class="layui-upload">
                          <div class="layui-upload-list">
                          <button type="button" class="layui-btn" id="test4">标识3D图片</button>
                            <img class="layui-upload-img domeImg" id="demo4">
                            <input type="hidden" name="image_3d_url" id="image_3d_url" value="">
                            <p id="demoText"></p>
                          </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识型号
                            </label>
                            <div class="layui-input-block">
                                 <input type="text" name="label_model"  class="layui-input" id="label_model" value="">
                            </div>
                        </div>

                         <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识标准类别
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_standard_id" name="label_standard_id" class="form-control" value="">
                                    <option value="">请选择标准类别</option>
                                    {volist name='label_standard_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.label_standard_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                适用地区
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_applicable_area_id" name="label_applicable_area_id" class="form-control">
                                    <option value="">请选择适用地区</option>
                                    {volist name='applicable_area_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.applicable_area_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识类别
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_type_id" name="label_type_id" class="form-control">
                                    <option value="">请选择标识类别</option>
                                    {volist name='label_type_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.label_type_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识样式
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_content_id" name="label_content_id" class="form-control">
                                    <option value="">请选择标识样式</option>
                                    {volist name='label_content_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.label_type_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                应用场景类别
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_applicable_scene_id" name="label_applicable_scene_id" class="form-control">
                                    <option value="">请选择应用场景</option>
                                    {volist name='applicable_scene_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.label_type_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识材质
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_material_id" name="label_material_id" class="form-control">
                                    <option value="">请选择标识材质</option>
                                    {volist name='material_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.material_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识尺寸
                            </label>
                            <div class="layui-input-block">
                                   <select id="label_size_id" name="label_size_id" class="form-control">
                                    <option value="">请选择用户组</option>
                                    {volist name='size_base_info' id='vo'}
                                        <option value="{$vo.id}">{$vo.size_value}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>



                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识供应商
                            </label>
                            <div class="layui-input-block">
                                  <input type="text" name="label_supplier" class="layui-input" id="label_supplier" placeholder="标识供应商" value="">
                            </div>
                        </div>  



                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识描述
                            </label>
                            <div class="layui-input-block">
                                  <input type="text" name="label_description" class="layui-input" id="label_description" placeholder="标识描述" value="">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                标识技术描述
                            </label>
                            <div class="layui-input-block">
                                  <input type="text" name="label_technical_information" class="layui-input" id="label_technical_information" placeholder="标识技术描述" value="">
                            </div>
                        </div>
                </div>

            <div class="layui-form-item">
                <div class="layui-input-block submit_btn">
                    <input id="addReset" type="reset" style="display: none" value="这个是Form清除" />
                    <button type="submit" class="layui-btn layui-btn-success">保存</button>
                </div>
            </div>
</form>
{/block}
{block name='js'}
<script type="text/javascript">
$(function(){
	w_ajaxSubmit($('#mainForm'))

	w_uplode('#test1','#demo1','/admin/banner/upload','img','#image_url_1');
    w_uplode('#test2','#demo2','/admin/banner/upload','img','#image_url_2');
    w_uplode('#test3','#demo3','/admin/banner/upload','img','#image_2d_url');
    w_uplode('#test4','#demo4','/admin/banner/upload','img','#image_3d_url');

    layui.use('laydate', function(){
  var laydate = layui.laydate;
  
  //执行一个laydate实例
    laydate.render({
    elem: '#delivery_time' //指定元素
    ,format: 'yyyy-MM-dd'
  });
});
});
</script>
{/block}
